找传奇、传世资源到传世资源站!

Bochs项目源码分析与注释.pdf

8.5玩家评分(1人评分)
下载后可评
介绍 评论 失效链接反馈

开源虚拟机源码分析from clipboardTable of ContentChapter 1 x86 体系结构与 PC 系统概要 .....................................11.1 x86 CPU 结构...............................................................................................................11.1.1 冯诺依曼架构和 CISC 指令集......................................................................11.1.2 CPU 结构........................................................................................................11.1.3 CPU 工作模式................................................................................................21.2 x86 体系结构概览........................................................................................................31.3 PC 系统.........................................................................................................................51.3.1 PC 系统概述...................................................................................................52.3.2 总线拓扑.........................................................................................................62.3.3 存储器与 I/O 编址 .........................................................................................62.3.4 关于系统的启动与引导.................................................................................8Chapter 2 Bochs 工程概述....................................................... 112.1 开源项目 Bochs 介绍.................................................................................................112.2 版本 2.2.1 源码组织..................................................................................................112.3 工程类结构.................................................................................................................122.4 主体框架结构分析.....................................................................................................132.4.1 Bochs 工程中的重要类................................................................................13(1) VM 控制台界面类 .............................................................................................13(2) CPU 模拟............................................................................................................14(3) Memory 模拟......................................................................................................14(4).I/O device 模拟...................................................................................................152.4.2 入口函数 main()及 Win32 Gui 初始化........................................................152.5 Bochs 的工作方式......................................................................................................18Chapter 3 CPU 类的源码分析 ...................................................203.1 CPU 类概述................................................................................................................203.1.1 CPU 逻辑结构框图......................................................................................203.1.2 类 BX_CPU_C 成员归纳.............................................................................203.2 类 BX_CPU_C 源码分析..........................................................................................213.2.1 CPU 特性声明..............................................................................................213.2.2 类 bxInstruction_c 成员分析........................................................................223.2.3 类 BX_CPU_C 源码注释.............................................................................223.3 通用寄存器.................................................................................................................293.3.1 数据结构与注释...........................................................................................293.3.2 通用寄存器归纳...........................................................................................303.4 段寄存器、全局寄存器 GDI 和 IDT ........................................................................313.4.1 数据结构与注释...........................................................................................313.4.2 段寄存器结构分析.......................................................................................333.5 CPU 状态字 EFLAGS................................................................................................353.5.1 数据结构与注释...........................................................................................35 Bochs 项目源码分析与注释 MAY 2006Understanding the source code of bochs3.5.2 源码分析.......................................................................................................393.6 函数 CPU_LOOP()结构分析.....................................................................................403.6.1 CPU_LOOP()函数总体结构........................................................................403.6.2 函数 CPU_LOOP()源码注释.......................................................................413.7 函数 handleAsyncEvent()分析...................................................................................443.7.1 函数 handleAsyncEvent()知识准备.............................................................443.7.2 函数 handleAsyncEvent()结构分析.............................................................463.7.3 函数 handleAsyncEvent()源码注释.............................................................473.8 取指与执行.................................................................................................................503.8.1 Intel IA-32 指令结构....................................................................................503.8.2 类 bxInstruction_c 的数据成员....................................................................533.8.3 取指译码函数 FetchDecode()分析 ..............................................................553.8.4 模拟指令的执行...........................................................................................59Chapter 4 CPU 中断处理任务管理............................................604.1 IA-32 体系结构中断知识准备 ..................................................................................604.1.1 中断和异常概述...........................................................................................604.1.2 异常和中断向量...........................................................................................604.1.3 中断和异常来源...........................................................................................614.1.4 与中断处理相关的数据结构.......................................................................624.1.5 异常和中断的处理方法...............................................................................644.2 Bochs 对中断的模拟..................................................................................................684.2.1 概述...............................................................................................................684.2.2 主要函数的源码注释...................................................................................694.3 虚拟机的任务管理.....................................................................................................824.3.1 IA-32 任务管理知识准备 ...........................................................................824.3.2 函数 task_switch()源码注释 ........................................................................89Chapter 5 存储器源码分析........................................................1045.1 IA-32 体系的存储器结构 ........................................................................................1045.2 Bochs 对存储器的模拟............................................................................................1055.3 存储器类 BX_MEM_C 部分源码分析...................................................................1075.3.1 相关数据结构与类定义.............................................................................1075.3.2 相关函数分析.............................................................................................1085.3 模拟分页机制...........................................................................................................1155.3.1 分页 (Paging)概述.....................................................................................1155.3.2 页目录与页表.............................................................................................1165.3.3 线形地址转换.............................................................................................1175.3.4 实现分页机制的源码分析.........................................................................120Chapter 6 系统板与外设模拟 ..................................................1366.1 Bochs 系统板描述类 bx_pc_system_c ...................................................................1366.1.1 类 bx_pc_system_c 功能概述 ....................................................................1366.1.2 PC system 定时器管理...............................................................................136 Bochs 项目源码分析与注释 MAY 2006Understanding the source code of bochs6.1.3 类 bx_pc_system_c 源码分析与注释 ........................................................1386.2 设备集合类 bx_devices_c........................................................................................1466.2.1 类 bx_devices_c 成员变量分析.................................................................1466.2.2 类 bx_devices_c 成员函数分析与注释 .....................................................1496.2.3 设备的初始化.............................................................................................1506.2.4 设备复位.....................................................................................................1546.2.5 设备访问(读写)的处理.........................................................................1556.2.6 已注册的 I/O handlers 和 IRQ 清单 ..........................................................1596.3 定时器(PIT)类分析.............................................................................................1666.3.1 类 bx_pit_c 概述.........................................................................................1666.3.2 类 bx_pit_c 源码注释.................................................................................1666.3.3 关于类 bx_virt_timer_c ..............................................................................1736.4 IDE 设备...................................................................................................................1736.4.1 磁盘控制器 controller_t .............................................................................1736.4.2 IDE 驱动器描述类 bx_hard_drive_c .........................................................1746.4.3 读写磁盘映象.............................................................................................1756.4.4 ATA/IDE 控制器(通道)和设备初始化.................................................1766.4.5 ATA 控制器的寄存器读写 ........................................................................1846.4.6 CD ROM 设备............................................................................................1936.5 PCI 子系统 ...............................................................................................................2036.5.1 PCI 概述 .....................................................................................................2036.5.2 PCI 主桥描述类 bx_pci_c 分析.................................................................2096.6 VGA 设备模拟.........................................................................................................2156.6.1 模拟 VGA 的类..........................................................................................2156.6.2 VGA 在 svga_timer 中的更新 ...................................................................216Appendix ...................................................................................217Appendix A.Bochs 配置文本说明 ....................................................................................217Appendix B.ATA 和 ATAPI 编程介绍.............................................................................225Appendix C.Sound Blaster 16 编程...................................................................................230Appendix D.VESA 编程介绍............................................................................................240Appendix E.Bochs 上运行的操作系统示范.....................................................................261

评论

发表评论必须先登陆, 您可以 登陆 或者 注册新账号 !


在线咨询: 问题反馈
客服QQ:174666394

有问题请留言,看到后及时答复